package net.sxnic.item.zzdw;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import net.sxinfo.core.entity.AbstractEntity;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 组织单位、工作单位 各子系统自行维护自己拥有的组织单位和工作单位，基础信息从用户中心获取
 * <p>每个大类只能有一个管理单位</p>
 * <p>每个大类有一组组织单位，从用户中心获取</p>
 * <p>本地只能删除，或从服务器获取，需要添加时再考虑</p>
 * @author yfsun
 * 
 */
@Entity
@Table(name = "item_zzdw")
@BatchSize(size = 10)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Zzdw extends AbstractEntity {

	private static final long serialVersionUID = 7493860047371630577L;
	
	public static final String GLDW_CATE="gldw";
	
	public static final String ZZDW_CATE="zzdw";
	
	public static final String GZDW_CATE="gzdw";
	
	@Column(length=20)
	private String deptCode;

	private String deptName;

	// 对应小类
	private String catalogCode;
	// 对应大类
	private String catalogAlias;

	// zzdw组织单位 gzdw工作单位
	@Column(length=8)
	private String cate;

	// 工作单位所属组织单位,即用户中心的上级单位
	//TODO 一个工作单位对应多个组织单位
	@Column(length=32)
	private String parentDetpCode;

	// 限额
	@Column(name="limit_")
	private int limit;
	
	//单位排序
	private double xorder;

	public Zzdw() {
		super();
	}

	public String getDeptCode() {
		return deptCode;
	}

	public void setDeptCode(String deptCode) {
		this.deptCode = deptCode;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getCate() {
		return cate;
	}

	public void setCate(String cate) {
		this.cate = cate;
	}

	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}

	public String getCatalogCode() {
		return catalogCode;
	}

	public void setCatalogCode(String catalogCode) {
		this.catalogCode = catalogCode;
	}

	public String getCatalogAlias() {
		return catalogAlias;
	}

	public void setCatalogAlias(String catalogAlias) {
		this.catalogAlias = catalogAlias;
	}

	public double getXorder() {
		return xorder;
	}

	public void setXorder(double xorder) {
		this.xorder = xorder;
	}

	public String getParentDetpCode() {
		return parentDetpCode;
	}

	public void setParentDetpCode(String parentDetpCode) {
		this.parentDetpCode = parentDetpCode;
	}
}
